//
//  UserDetailHeaderView.swift
//  TCMHealth
//
//  Created by 刘占雨 on 2023/7/19.
//

import UIKit

class UserDetailHeaderView: UITableViewHeaderFooterView {
    @IBOutlet weak var nameLabel: UILabel!
    @IBOutlet weak var phoneLabel: UILabel!
    @IBOutlet weak var genderLabel: UILabel!
    @IBOutlet weak var ageLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.backgroundColor = UIColor.systemGray6
    
    }
    
    var userInfo: UserInfo {
        set {
            nameLabel.text = newValue.name
            phoneLabel.text = newValue.phone
            genderLabel.text = newValue.gender
            ageLabel.text = newValue.age
        }
        
        get {
            return self.userInfo
        }
    }
    
}
